home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / POV-Ray 3.0.2 / src / MacSource / CursorUtils.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-14  |  2.4 KB  |  86 lines  |  [TEXT/CWIE]

  1. /*==============================================================================
  2. Project:    POV
  3.  
  4. Version:    3
  5.  
  6. File:    CursorUtils.c
  7.  
  8. Description:
  9. Routines to handle different cursor disaplys.
  10. ------------------------------------------------------------------------------
  11. Author:
  12.     Eduard [esp] Schwan
  13. ------------------------------------------------------------------------------
  14.     from Persistence of Vision(tm) Ray Tracer
  15.     Copyright 1996 Persistence of Vision Team
  16. ------------------------------------------------------------------------------
  17.     NOTICE: This source code file is provided so that users may experiment
  18.     with enhancements to POV-Ray and to port the software to platforms other 
  19.     than those supported by the POV-Ray Team.  There are strict rules under
  20.     which you are permitted to use this file.  The rules are in the file
  21.     named POVLEGAL.DOC which should be distributed with this file. If 
  22.     POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  23.     Team Coordinator by leaving a message in CompuServe's Graphics Developer's
  24.     Forum.  The latest version of POV-Ray may be found there as well.
  25.  
  26.     This program is based on the popular DKB raytracer version 2.12.
  27.     DKBTrace was originally written by David K. Buck.
  28.     DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  29. ------------------------------------------------------------------------------
  30. Change History:
  31.     960630    [esp]    celebrate 12th wedding anniversary :-)
  32. ==============================================================================*/
  33.  
  34. #define CURSORUTILS_C
  35.  
  36. #include "CursorUtils.h"
  37.  
  38. #include <QuickDraw.h>
  39. #include <Memory.h>
  40. #include <ToolUtils.h>    // Cursor stuff
  41.  
  42.  
  43. static Cursor            gWaitCursor;
  44.  
  45.  
  46. // ---------------------------------------------------------------------
  47. // load the image of the Watch cursor
  48.  
  49. #pragma segment Cursor
  50.  
  51. void InitWatchCursor(void)
  52.     {
  53.     CursHandle    hCurs;
  54.  
  55.     hCurs = GetCursor(watchCursor);
  56.     if (hCurs != NULL)
  57.         {
  58.         MoveHHi((Handle)hCurs);
  59.         HLock((Handle)hCurs);
  60.         gWaitCursor = **hCurs;
  61.         }
  62.     } // InitWatchCursor()
  63.  
  64.  
  65. // ---------------------------------------------------------------------
  66. // change the cursor to the Watch
  67.  
  68. #pragma segment Cursor
  69.  
  70. void ShowWatchCursor(void)
  71.     {
  72.     SetCursor(&gWaitCursor);
  73.     } // ShowWatchCursor()
  74.  
  75.  
  76. // ---------------------------------------------------------------------
  77. // change the cursor to the Arrow
  78.  
  79. #pragma segment Cursor
  80.  
  81. void ShowArrowCursor(void)
  82.     {
  83.     SetCursor(&qd.arrow);
  84.     } // ShowArrowCursor()
  85.  
  86.